From 42aa22979e6a72534dbbb67f3bddafcc641dcfe2 Mon Sep 17 00:00:00 2001 From: robertl Date: Thu, 6 Jan 2005 16:24:17 +0000 Subject: [PATCH] Don't leak on replacement. --- util.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/util.c b/util.c index 11d3e8783..69f0d9370 100644 --- a/util.c +++ b/util.c @@ -658,7 +658,9 @@ gstrsub(const char *s, const char *search, const char *replace) char *o = xstrdup(s); while (strstr(o, search)) { + char *oo = o; o = strsub(o, search, replace); + xfree(oo); } return o; -- 2.30.2